package com.huanwei.cc.http;

import android.content.Context;

import java.util.HashMap;
import java.util.Map;


/**
 * Created by 智江鹏 on 2016/11/18.
 * 鲜台网API封装
 */

public class XianTaiWangAPI {



    //列表
    public static final String MENUJSON2 = "http://api.avatardata.cn/Lore/List";
    //详情
    public static final String MENUJSON3 = "http://api.avatardata.cn/Lore/Show";
    public static final String APPKEY = "4b13757ce1cd441d92783801247c3ba2";

    //
    public static final String APPKEY2 = "a132b3511903dcd50c1a71bca374636b";
    public static final String MENUJSON4 = "http://v.juhe.cn/toutiao/index?type=top&key=f3db21da51805d1f8719a3b583c23250";

    public static void OrdermarketList(Context context, String page,
                                       String rows, AsyncManaer.Objectcallback handler) {
//        Map<String, String> map = new HashMap<>();
//        map.put("key", APPKEY);
//        map.put("page", page);
//        map.put("rows", rows);
//        map.put("id", "10");

        AsyncManaer.getInstance(context).sendRequest(MENUJSON2, null, handler);

    }

    public static void Ordermarketshow(Context context,
                                       String id, AsyncManaer.Objectcallback handler) {
        Map<String, String> map = new HashMap<>();
        map.put("key", APPKEY);
        map.put("id", id);

        AsyncManaer.getInstance(context).sendRequest(MENUJSON3, map, handler);

    }

    public static void getname(Context context,
                               String page, String rows, AsyncManaer.Objectcallback handler) {
//        Map<String, String> map = new HashMap<>();
//        map.put("key", APPKEY2);
//        map.put("page", page);
//        map.put("num", rows);
        AsyncManaer.getInstance(context).get(MENUJSON4, null, handler);

    }
}



